//
//  ST_PairsCenterPeculiaritySingleDetailCell.swift
//  btvideo
//
//  Created by mac on 2020/1/10.
//  Copyright © 2020 JarvanZhang. All rights reserved.
//

import UIKit
import SnapKit
import SwifterSwift
//一张图
class ST_PairsCenterPeculiaritySingleDetailCell: ST_PairsCenterPeculiarityDetailCell {
    
    override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
           
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        
       images_container_view.addSubview(cover_image_view)
       cover_image_view.snp.makeConstraints { (make) in
           make.edges.equalToSuperview()
       }
           
       }
       
       required init?(coder: NSCoder) {
           fatalError("init(coder:) has not been implemented")
       }
       
       fileprivate lazy var cover_image_view:ST_PairsCenterPeculiarityImageView = {
           let control = ST_PairsCenterPeculiarityImageView()
           control.contentMode = UIView.ContentMode.scaleAspectFill
           return control
       }()
       
       
       override func bind_model_view() {
           super.bind_model_view()
           
           
        if let item = self.model.detail.first, let url = item.content.compress_image().url{

               cover_image_view.pin_setImage(from: url, placeholderImage: ST_SwiftConst.shared.fetch_random_place_holder_image())
               cover_image_view.isCheck = item.state == 1
           }
           
           
           
   //        #if DEBUG
   //        cover_image_view.backgroundColor = Color.random
   //        #endif
       }
       
   }
